import Router from 'koa-router';
import proxyService from '../../common/proxyService';
import {
  functionPurchaseChat,
  getFunctionAll,
  // getKfFunctionByCondition,
} from '../../api';

const router = new Router();

// 请求购买功能
router.get('/functionPurchase', async ctx => {
  const response = await proxyService.postProxy(ctx, functionPurchaseChat);
  return (ctx.body = response);
});

// 获取所有功能列表
router.post('/getFunctionAll', async ctx => {
  const response = await proxyService.postProxy(ctx, getFunctionAll);
  return (ctx.body = response);
});

// 获取所需功能列表
// router.post('/getKfFunctionByCondition', async ctx => {
//   const response = await proxyService.postProxy(ctx, getKfFunctionByCondition);
//   return (ctx.body = response);
// });

export default router;
